﻿window.document.calculate_footer = function (footer, default_value) {
    default_value = default_value || 0;
    if (footer && $(footer).length > 0) {
        var hight = $(window).height() - $(document.body).height();
        if (hight > 0) {
            $(footer).css("margin-top", hight + "px");
        }
        else {
            $(footer).css("margin-top", default_value + "px");
        }
    }
}
